package com.zan.dao;

import com.zan.entity.Category;
import com.zan.entity.CategoryVo;
import com.zan.entity.CategoryVo2;
import com.zan.general.GeneralDao;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper extends GeneralDao<Category> {

    // 1.连接查询
    public List<CategoryVo> selectAllCategories();

    // 2.子查询: 根据parentId查询子分类
    public List<CategoryVo> selectAllCategories2(int parentId);

    // 查询一级类别
    public List<CategoryVo2> selectFirstLevelCategories();
}